Task.getId   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 3
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 3
c 0
b 0
f 0
rs 10
cc 1
1
import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm';
2
3
@Entity()
4
export class Task {
5
  @PrimaryGeneratedColumn('uuid')
6
  private id: string;
7
8
  @Column({ type: 'varchar', nullable: false })
9
  private name: string;
10
11
  constructor(name: string) {
12
    this.name = name;
13
  }
14
15
  public getId(): string {
16
    return this.id;
17
  }
18
19
  public getName(): string {
20
    return this.name;
21
  }
22
23
  public updateName(name: string): void {
24
    this.name = name;
25
  }
26
}
27